<!-- markdown文本 预览组件 - VMdPreview -->
<template>
    <VueMarkdownPreview :text="text"></VueMarkdownPreview>
</template>

<script setup>
import VueMarkdownPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css'

import vuepressTheme from "@kangc/v-md-editor/lib/theme/vuepress.js";
import "@kangc/v-md-editor/lib/theme/style/vuepress.css";
import Prism from "prismjs";
import createCopyCodePreview from '@kangc/v-md-editor/lib/plugins/copy-code/preview';
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css';
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';
import createAlignPlugin from '@kangc/v-md-editor/lib/plugins/align';

VueMarkdownPreview.use(vuepressTheme, {
  Prism,
});

VueMarkdownPreview.use(createCopyCodePreview());
VueMarkdownPreview.use(createEmojiPlugin());
VueMarkdownPreview.use(createAlignPlugin());

const props = defineProps({
    text: {
        type: String,
        default: "",
    },
});

</script>